<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="css/map.css" type="text/css" rel="stylesheet" />
    <script src="https://webapi.amap.com/maps?v=1.4.15&key=7d0def66f7ca03cf22f31fc8f8797165"></script>
    <script src="js/AMapdirll.js"></script>
</head>
<body onload="myMap()">
       <div id="container-box" style="width:1800px;height: 800px;"></div>
<script type="text/javascript" >
    function  myMap() {
        var maMap =amapdirll('container-box',{
                    center: [116.396923, 39.948203],
                    resizeEnable: true,
                    zoom: 10,
                    lang: 'ch',
                    keyboardEnable: true
                });
        // var arr=[
        //     {
        //         label:'张掖',
        //         border:'116.169465,39.932670|116.160260,39.924492|116.186138,39.879817|116.150625,39.710019|116.183198,39.709920',
        //         showLabel:true,
        //         scroe:80,
        //         lat:39.924492,
        //         lng:116.160260,
        //         PolygonOptions:{
        //             normal:{
        //                 strokeColor: "green", //线颜色
        //                 fillColor: "yellow"
        //             },
        //             active:{
        //                 strokeColor: "blue", //线颜色
        //                 fillColor: "blue"
        //             },
        //             hover:{
        //                 strokeColor: "red", //线颜色
        //                 fillColor: "red"
        //             }

        //         },
        //         type:1,//type 状态，0
        //     },
        //     {
        //         label:'宁国',
        //         border:'116.421078,39.810771|116.442621,39.799892|116.463478,39.790066|116.588276,39.809551|116.536091,39.808859',
        //         showLabel:true,
        //         type:2,//type 状态，0
        //     },
        //     {
        //         label:'安徽',
        //         border:'116.600293,39.937770|116.540039,39.937968|116.514805,39.982375|116.499935,40.013710|116.546520,40.030443',
        //         showLabel:true,
        //         type:0,//type 状态，0
        //     }
        // ]
        // maMap.drawGrid(arr,function (i) {
        //        alert(i);
        // });
        let flagarr=[
            {
                label:'合肥科学技术大学',//必填
                type:1,//状态
                unitType:0,//单位类型
                lng:'116.396923',
                lat:'39.948203'
            },
            {
                label:'兰州科学技术大学',//必填
                type:0,//状态
                unitType:1,//单位类型
                lng:'116.196923',
                lat:'39.918203'
            },

        ]
        maMap.drawFlag(flagarr,function (i) {
            alert(i);
        });
    }
</script>

</body>
</html>